I have to find this command every time I use a new system so I'm putting it here. Run
cat >> ~/.inputrc <<'EOF'
"\e[A": history-search-backward
"\e[B": history-search-forward
EOF
in a terminal to search history for autocompletion. You have to re-launch your shell after running it, or run
bind -f ~/.inputrc